import { createRouter, createWebHistory } from 'vue-router'
import Index from "@/views/index";
import List from "@/views/list";
import Detail from "@/views/detail";

const routes = [
    {
        path: '/:catchAll(.*)',
        redirect: '/index'
    },
    {
        path: '/index',
        component: Index
    },
    {
        path: '/list',
        component: List
    },
    {
        path: '/detail',
        component: Detail
    },

]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router